package basic_practice_1031;

import java.util.Scanner;
public class Main {
    public static void main(String[]args){
        Scanner scanner=new Scanner(System.in);
        String item;

        int[]map;
        int maxValue=0;

        while (scanner.hasNext()){
            item= scanner.next();
            map=new int[10];

            for(int i=0;i<item.length();i++){
                int value=item.charAt(i)-'0';
                if(value>9||value<0){
                    continue;
                }
                map[value]++;
                if(map[value]>maxValue){
                    maxValue=map[value];
                }
            }

            for(int i = maxValue;i>0;i--){
                for(int j=0;j<10;j++){
                    if(map[j]>=i){
                        System.out.print('*');
                    }else {
                        System.out.print(' ');
                    }
                }
                System.out.println();
            }
            System.out.println("0123456789");
        }
    }
}
